package com.ytc.order.controller;

import com.ytc.commons.model.vo.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ytc.order.service.PaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 订单支付信息前端控制器
 * </p>
 *
 * @author jiuye145
 */
@Slf4j
@RestController
@RequestMapping("/payment")
public class PaymentController {

    @Autowired
    private PaymentService  paymentService;

    /**
     * //创建支付信息，获取微信支付的二维码
     * 地址：GET /createPay？orderNo=abc
     * 参数：
     *      Query类型：orderNo（订单号）
     * 响应
     *      ResponseResult<String>
     */
   // @GetMapping("/createPay")
    public ResponseResult<String> createPay(String orderNo) {
        return paymentService.createPay(orderNo);
    }
}
